package com.haixiaoke.saas.enterprise.task;

import com.haixiaoke.saas.messageCenter.service.IOrdinaryMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 消息推送定时任务
 * @author panda
 * @Date 2024/11/23
 **/
@Component
public class MessageTask {

    @Autowired
    private IOrdinaryMessageService ordinaryMessageService;

    /**
     * 每分钟执行一次密码有效变更任务
     */
    @Scheduled(cron = "0 * * * * ?")
    public void sendMessageTask() {
        ordinaryMessageService.sendMessageTask();
    }
}
